//
//  RHClassicCasesCell.m
//  RuiHeAppApp
//
//  Created by Yan Chen on 2023/7/12.
//

#import "RHClassicCasesCell.h"

@interface RHClassicCasesCell()

@property (nonatomic, strong) UIImageView   *prductImgView;

@property (nonatomic, strong) QMUILabel     *prductdescLab;


@end

@implementation RHClassicCasesCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        [self setupUI];
    }
    return self;
}
-(void)setImageName:(NSString *)imageName
{
    self.prductImgView.image = [UIImage imageNamed:imageName];
}
- (void)setupUI{
    
    [self setBackgroundColor:UIColor.clearColor];
    [self.contentView setBackgroundColor:UIColor.clearColor];
    
    UIView *bgView = [[UIView alloc] init];
    [bgView.layer setCornerRadius:8];
    [bgView.layer setMasksToBounds:YES];
    [self.contentView addSubview:bgView];
    
    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_offset(15);
        make.right.mas_offset(-15);
        make.top.mas_offset(0);
        make.bottom.mas_offset(-15);
        make.height.mas_equalTo(188);
    }];
    
    _prductImgView = [[UIImageView alloc] init];
    [_prductImgView setBackgroundColor:UIColor.whiteColor];
    _prductImgView.image = kImage(@"Home_guangao-1");
    [bgView addSubview:_prductImgView];
    
    [_prductImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.insets(UIEdgeInsetsMake(0, 0, 0, 0));
    }];
    
    
    
    UIView *labBg = [[UIView alloc] init];
    [labBg setBackgroundColor:kColorRGBA(0, 0, 0, 0.5)];
    [_prductImgView addSubview:labBg];
    
    [labBg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
        make.height.mas_equalTo(60);
     }];
    
    

    _prductdescLab = [[QMUILabel alloc]init];
    _prductdescLab.text = @"To learn more about adding testers to your developer account, visit TestFlight beta testing overview in App Store Connect Help.As a reminder";
    _prductdescLab.font = kSYSTEMFONT(12);
    _prductdescLab.numberOfLines = 0;
    _prductdescLab.textColor = UIColor.whiteColor;
    _prductdescLab.backgroundColor = UIColor.clearColor;
    _prductdescLab.textAlignment = NSTextAlignmentLeft;
    [labBg addSubview:_prductdescLab];
    
    [_prductdescLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.insets(UIEdgeInsetsMake(5, 5, 5, 5));
     }];
    
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
